using System;
using Spread.Common.Features.Sample;
using FarPoint.Win.Spread;
using Spread.Common.DataStore;

namespace Spread.Skins
{
    public partial class Introduction : BaseSampleControl
    {
        public Introduction()
        {
            InitializeComponent();
            Name = "Introduction";
            skinComboBox.DataSource = DefaultSpreadSkins.Skins;

            sheetView.DataAutoSizeColumns = false;
            sheetView.Columns.Default.Width = 90;
            sheetView.Rows.Default.Height = 25;
            sheetView.DataSource = new DataService().AccessDataSource.GetNWINDData("Products");
            spread.StatusBarVisible = true;
            spread.DefaultSkin = DefaultSpreadSkins.Office2016DarkGray;
            skinComboBox.SelectedIndex = Array.IndexOf(DefaultSpreadSkins.Skins, DefaultSpreadSkins.Office2016DarkGray);
        }
        private void SkinComboBox_IndexChanged(object sender,EventArgs e)
        {
            spread.DefaultSkin = (SpreadSkin)skinComboBox.SelectedItem;
        }
    }
    
}


//
//Introduction.Designer.cs
//


namespace Spread.Skins
{
    partial class Introduction
    {
        /// <summary> 
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.spread = new FarPoint.Win.Spread.FpSpread();
            this.sheetView = new FarPoint.Win.Spread.SheetView();
            this.skinLabel = new System.Windows.Forms.Label();
            this.skinComboBox = new System.Windows.Forms.ComboBox();
            this.pnlMain.SuspendLayout();
            this.pnlControls.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.spread)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.sheetView)).BeginInit();
            this.SuspendLayout();
            // 
            // pnlMain
            // 
            this.pnlMain.Controls.Add(this.spread);
            // 
            // pnlControls
            // 
            this.pnlControls.Controls.Add(this.skinLabel);
            this.pnlControls.Controls.Add(this.skinComboBox);
            // 
            // spread
            // 
            this.spread.Dock = System.Windows.Forms.DockStyle.Fill;
            this.spread.Location = new System.Drawing.Point(0, 0);
            this.spread.Name = "spread";
            this.spread.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] {
            this.sheetView});
            this.spread.Size = new System.Drawing.Size(477, 487);
            this.spread.TabIndex = 0;
            // 
            // sheetView
            // 
            this.sheetView.Reset();
            this.sheetView.SheetName = "Introduction";
            // Formulas and custom names must be loaded with R1C1 reference style
            this.sheetView.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1;
            this.sheetView.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1;
            // 
            // skinLabel
            // 
            this.skinLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.skinLabel.Location = new System.Drawing.Point(5, 23);
            this.skinLabel.Name = "skinLabel";
            this.skinLabel.Size = new System.Drawing.Size(136, 20);
            this.skinLabel.TabIndex = 4;
            this.skinLabel.Text = "Select Skin";
            // 
            // skinComboBox
            // 
            this.skinComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.skinComboBox.FormattingEnabled = true;
            this.skinComboBox.Location = new System.Drawing.Point(5, 46);
            this.skinComboBox.Name = "skinComboBox";
            this.skinComboBox.Size = new System.Drawing.Size(136, 21);
            this.skinComboBox.TabIndex = 3;
            this.skinComboBox.SelectedIndexChanged += new System.EventHandler(this.SkinComboBox_IndexChanged);
            // 
            // Introduction
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Name = "Introduction";
            this.pnlMain.ResumeLayout(false);
            this.pnlControls.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.spread)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.sheetView)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private FarPoint.Win.Spread.FpSpread spread;
        private FarPoint.Win.Spread.SheetView sheetView;
        private System.Windows.Forms.Label skinLabel;
        private System.Windows.Forms.ComboBox skinComboBox;
    }
}
